package com.jinbiao.quasar.model;

import com.jinbiao.quasar.scheduling.constant.ScheduleConstants;
import lombok.Data;
import org.sagacity.sqltoy.config.annotation.Column;
import org.sagacity.sqltoy.config.annotation.Entity;

import java.sql.Types;
import java.util.Date;

@Data
@Entity(tableName = "sys_job")
public class SysJob extends BaseModel{
    @Column(name = "job_name", type = Types.VARCHAR)
    private String jobName;
    @Column(name = "job_inner_name", type = Types.VARCHAR)
    private String jobInnerName;
    @Column(name = "job_group", type = Types.VARCHAR)
    private String jobGroup;
    @Column(name = "cron", type = Types.VARCHAR)
    private String cron;
    @Column(name = "fixed_rate", type = Types.VARCHAR)
    private String fixedRate;
    @Column(name = "fixed_delay", type = Types.VARCHAR)
    private String fixedDelay;
    @Column(name = "initial_delay", type = Types.VARCHAR)
    private String initialDelay;
    @Column(name = "start_time", type = Types.DATE)
    private Date startTime;
    @Column(name = "zone", type = Types.VARCHAR)
    private String zone;
    /**
     * 0=默认,1=立即触发执行,2=触发一次执行,3=不触发立即执行
     */
    @Column(name = "misfire_policy", type = Types.VARCHAR)
    private String misfirePolicy = ScheduleConstants.MISFIRE_DEFAULT;
    @Column(name = "end_time", type = Types.DATE)
    private Date endTime;
    @Column(name = "concurrent", type = Types.VARCHAR)
    private String concurrent;
    @Column(name = "job_type", type = Types.VARCHAR)
    private String jobType;
}
